repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
More problems
[andmenj-acm.git]
/
Mi manual de algoritmos
/
version_maraton_interuniversitaria_2008-2
/
src
/
c++
/
unicode.cpp
blob
55c49709141c001644b8069c31d1560a690178e4
1
#include <iostream>
2
#include <cassert>
3
#include <stdio.h>
4
#include <assert.h>
5
#include <wchar.h>
6
#include <wctype.h>
7
#include <locale.h>
8
9
using namespace
std
;
10
11
int
main
(){
12
assert
(
setlocale
(
LC_ALL
,
"en_US.UTF-8"
) !=
NULL
);
13
wchar_t
c
;
14
15
wstring s
;
16
while
(
getline
(
wcin
,
s
)){
17
wcout
<<
L
"LeĆ : "
<<
s
<<
endl
;
18
for
(
int
i
=
0
;
i
<
s
.
size
(); ++
i
){
19
c
=
s
[
i
];
20
wprintf
(
L
"%lc %lc
\n
"
,
towlower
(
s
[
i
]),
towupper
(
s
[
i
]));
21
}
22
}
23
24
return
0
;
25
}
26
27